//
//  SecondCollectionViewCell.m
//  真·豆瓣半完全体
//
//  Created by dllo on 16/1/7.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "SecondCollectionViewCell.h"

@implementation SecondCollectionViewCell
- (void) dealloc{
    [_imgView release];
    [_label release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatCell];
    }
    return self;
}
- (void)creatCell{
    self.imgView = [[UIImageView alloc] init];
    [self.contentView addSubview:_imgView];
    [_imgView release];
    
    self.label = [[UILabel alloc] init];
    [self.contentView addSubview:_label];
    [_label release];
}
- (void) applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes{
    _imgView.frame = CGRectMake(0, 0, layoutAttributes.frame.size.width, layoutAttributes.frame.size.height - 30);
    
    _label.frame = CGRectMake(0, layoutAttributes.frame.size.height - 30, layoutAttributes.frame.size.width, 30);
    _label.textAlignment = NSTextAlignmentCenter;
}




@end
